﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace BW.WMS.Redis
{
    public interface IRedisService : IApplicationService
    {
        Task SetAsync<T>(string key, T value, TimeSpan? expiration = null);
        Task<T> GetAsync<T>(string key);
        Task RemoveAsync(string key);
        Task<bool> ExistsAsync(string key);
        Task RemoveByPatternAsync(string pattern);
        Task<List<string>> GetKeysByPatternAsync(string pattern);
        Task<long> RemoveMultipleAsync(List<string> keys);
    }
}